﻿using System;
using System.Collections.Generic;
using System.Text;
using HotelManagement.Common;
using HotelManagement.DL.DAO;

namespace HotelManagement.BL
{
    public class GoodsMngBL
    {
        public int UpdateGoods(Goods goods)
        {
            int nResult = (int)ReturnType.FAILED;
            try
            {
                GoodsDL GoodsDL = new GoodsDL();
                nResult = GoodsDL.UpdateGoods(goods);
            }
            catch
            {
                throw;
            }

            return nResult;
        }

        public int AddGoods(Goods goods)
        {
            int nResult = (int)ReturnType.FAILED;
            try
            {
                GoodsDL GoodsDL = new GoodsDL();
                nResult = GoodsDL.AddGoods(goods);
            }
            catch
            {
                throw;
            }

            return nResult;
        }

        public int DeleteGoods(Goods goods)
        {
            int nResult = (int)ReturnType.FAILED;
            try
            {
                GoodsDL GoodsDL = new GoodsDL();
                nResult = GoodsDL.DeleteGoods(goods);
            }
            catch
            {
                throw;
            }

            return nResult;
        }
    }
}
